package com.xywang.service;

import com.xywang.dao.BookMapper;
import com.xywang.pojo.Books;

import java.util.List;

public class BookServiceImpl implements BookService{
    private BookMapper bookMapperImpl;

    public void setBookMapperImpl(BookMapper bookMapperImpl) {
        this.bookMapperImpl = bookMapperImpl;
    }

    @Override
    public int addBook(Books books) {
        return bookMapperImpl.addBook(books);
    }

    @Override
    public int deleteBook(int id) {
        return bookMapperImpl.deleteBook(id);
    }

    @Override
    public int updateBook(Books books) {
        return bookMapperImpl.updateBook(books);
    }

    @Override
    public Books selectBookByID(int id) {
        return bookMapperImpl.selectBookByID(id);
    }

    @Override
    public List<Books> selectAllBooks() {
        return bookMapperImpl.selectAllBooks();
    }

    @Override
    public List<Books> selectBooksByName(String name) {
        return bookMapperImpl.selectBooksByName(name);
    }
}
